
CXX = g++

OBJFILES1 = mainmlscore.o ../core/constraints.o ../core/deformation.o ../meshdef/ply.o 
OBJFILES2 = mainmlsmesh.o ../core/constraints.o ../core/deformation.o \
			../meshdef/mesh.o ../meshdef/deformationMesh.o ../meshdef/weightsScheme.o \
			../meshdef/skeleton.o ../meshdef/RBFfunction.o ../meshdef/ply.o
OBJFILES3 = mainmlsmeshskel.o ../core/constraints.o ../core/deformation.o \
			../meshdef/mesh.o ../meshdef/deformationMesh.o ../meshdef/weightsScheme.o \
			../meshdef/meshWithSkeleton.o ../meshdef/deformationSkelMesh.o \
			../meshdef/skeleton.o ../meshdef/RBFfunction.o ../meshdef/ply.o
##############################################################################
all: mlscore mlsmesh mlsmeshskel

mlscore: $(OBJFILES1)
	@echo "Linking ...."
	$(CXX) -o $@ -O2 $^ 

mlsmesh: $(OBJFILES2)
	@echo "Linking ...."
	$(CXX) -o $@ -O2 $^ -lCGAL -llapack 

mlsmeshskel: $(OBJFILES3)
	@echo "Linking ...."
	$(CXX) -o $@ -O2 $^ -lCGAL -llapack 

.cpp.o: $*.h
	@echo "Compiling C++ code ...."
	$(CXX) -c -O2 $*.cpp

clean:
	rm *.o 
